package com.ssy.lingxi.sms.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.sms.api.entity.SmsSendMsg;
import com.ssy.lingxi.sms.api.hystrix.SendSmsHystrix;
import com.ssy.lingxi.sms.api.model.SmsVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;
import java.util.List;

/**
 * @menu: 短信发送服务
 * 短信发送接口
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/15
 */
@FeignClient(value = "sms-service", fallback = SendSmsHystrix.class)
public interface ISendSmsFeign {

    /**
     * 发送短信
     * @param smsVO
     * @return
     */
    @RequestMapping(value = "/sms/sendSms", method = RequestMethod.POST)
    Wrapper<List<SmsSendMsg>> sendSms(@RequestBody @Valid SmsVO smsVO);

}
